using System;
using System.ComponentModel;
using System.Collections.Generic;
using System.Web;
using System.Web.Compilation;

namespace skmExpressionBuilders
{
    [ExpressionPrefix("QueryString"), ExpressionEditor("skmExpressionBuilders.Design.QueryStringExpressionEditor, skmExpressionBuilders")]
    public class QueryStringExpressionBuilder : BaseServerObjectExpressionBuilder
    {
        public static QueryStringExpressionBuilder Instance()
        {
            return new QueryStringExpressionBuilder();
        }

        protected override object GetValue(string key)
        {
            return HttpContext.Current.Request.QueryString[key];
        }

        public override string SourceObjectName
        {
            get { return "QueryString"; }
        }    
    }
}
